package com.kpmg.datalake.reportanalysis.scheduling;

import com.kpmg.datalake.reportanalysis.service.DataService;
import com.kpmg.datalake.schedule.model.ScheduleJob;
import com.kpmg.datalake.schedule.service.ScheduleExecuteService;
import javax.annotation.Resource;
import org.springframework.stereotype.Component;

/**
 * 请求状态定时检查任务
 *
 * @author user
 */
@Component
public class RequestStatusCheckTask implements ScheduleExecuteService {

  @Resource
  private DataService dataService;


  /**
   * 动态任务实现的接口
   * <br>
   *
   * @param scheduleJob 任务信息
   * @Scheduled(fixedRate=1000*60*30) public void checkRequestStatus() {
   * dataService.flushRequestStatus(false);  }
   */
  @Override
  public void execute(ScheduleJob scheduleJob) {
    dataService.flushRequestStatus(false);
  }
}